package com.siteseat.common.json;

import java.util.List;

import com.siteseat.common.foundation.Component;
import com.siteseat.common.foundation.PropertyHelper;

/**
 *
 */
public class ClassBean extends Component {

  private List<String> classes;

  /**
   * Gets the classes
   *
   * @return the classes
   */
  public List<String> getClasses() {
    return classes;
  }

  /**
   * Sets the classes
   *
   * @param classes the classes to set
   */
  public void setClasses( List<String> classes ) {
    this.classes = classes;
  }

  /**
   * {@inheritDoc}
   */
  @Override
  protected void doDestroy() throws Exception {
    // TODO Auto-generated method stub
    
  }

  /**
   * {@inheritDoc}
   */
  @Override
  protected void doInit() throws Exception {
    List<String> cs = getClasses();
    
    PropertyHelper.ensureNotNull( log, cs, "classes" );
    for( String c: cs ) {
      Class.forName( c );
    }
  }
  
}
